Data reading method, storage controller and storage device

ABSTRACT

A data reading method is provided. The method includes using X read voltage sets to read a target word line, so as to obtain X read results; in a first order, updating a final Gray code index of each of a plurality of target memory cells of the target word line, and obtaining (X− 1 ) abnormal Gray code count sets according to the X read results, wherein an i th  read result among the X read results includes a Gray code corresponding to an i th  read voltage set of each of the target memory cells, and the Gray code corresponds to one of N Gray code indexes; and selecting (N− 1 ) optimized read voltages from (X− 1 )*(N− 1 ) read voltages of the corresponding (X− 1 ) read voltage sets to form an optimized read voltage set according to the obtained (X− 1 ) abnormal Gray code count sets.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority benefit of Taiwan applicationserial no. 107146597, filed on Dec. 22, 2018. The entirety of theabove-mentioned patent application is hereby incorporated by referenceherein and made a part of this specification.

BACKGROUND Field of the disclosure

The disclosure relates to a data reading method and more particularly,to a data reading method, a storage controller and a storage deviceadapted for a storage device configured with a rewritable non-volatilememory module.

Description of Related Art

Digital cameras, mobile phones and MP3 players have grown very rapidlyin recent years, and accordingly, consumers' demands for storage mediahas increased rapidly. A rewritable non-volatile memory module (e.g., aflash memory) is suitable for being built in the aforementioned portablemulti-media devices listed above due to having characteristics such asdata non-volatility, low power consumption, compact size and nomechanical structure.

Along with the advancement of technologies, in order to satisfy growingstorage demands, memory architectures of the rewritable non-volatilememory module is also developed to have a greater unit storage space,for example, a triple level cell (TLC) NAND flash memory module (i.e., aflash memory module capable of storing data of 3 bits in one memorycell), a quadruple level cell (QLC) NAND flash memory module (i.e., aflash memory module capable of storing data of 4 bits in one memorycell), a triple-level cell (TLC) NAND flash memory module (i.e., a flashmemory module capable of storing data of 4 bits in one memory cell) or arewritable non-volatile memory module having a three-dimensional (3D)stacking structure (e.g., a 3D NAND flash memory module or a verticalNAND flash memory module). However, because memory cells of theaforementioned flash memory modules have less stable physical states,which results in less stable threshold voltages of the memory cells ofthe aforementioned flash memory modules, threshold voltage distributionsof the memory cells of the aforementioned flash memory modules cannot beaccurately measured.

Thus, how to overcome the issue of unstable threshold voltages of thememory cells to obtain more accurate threshold voltage distributions andperform optimization on read voltages according to the more accuratethreshold voltage distributions to improve a reading efficiency of therewritable non-volatile memory module and its corresponding decodingefficiency is one of the subjects studied by people in the field.

SUMMARY

The disclosure provides a data reading method, a storage controller anda storage device capable of determining an abnormal threshold voltagedistribution to find out an optimized read voltage.

An embodiment of the disclosure provides a data reading method for astorage device configured with a rewritable non-volatile memory module,wherein the rewritable non-volatile memory module has a plurality ofword lines and a plurality of memory cells, and the memory cells aregrouped into the word lines. The method includes: using X read voltagesets to read a target word line among the word lines, so as to obtain Xread results, wherein a plurality of target memory cells among thememory cells corresponding to the target memory cells of the target wordline are all programmed, wherein the X read voltage sets are sorted in afirst order according to an average voltage value of each of the X readvoltage sets, wherein a difference value of an average voltage value ofan (i+1)^(th) read voltage set among the X read voltage sets deducted byan average voltage value of an i^(th) read voltage set is a positivepredetermined voltage offset value, wherein each of the X read voltagesets has (N−1) read voltages sorted in a second order, wherein X is afirst predetermined positive integer, i is a positive integer rangingfrom 1 to X, i is initially set to 1, and N is a second predeterminedpositive integer greater than 2; in the first order, updating a finalGray code index of each of the target memory cells and obtaining (X−1)abnormal Gray code count sets according to the X read results, whereinan i^(th) read result among the X read results includes a Gray codecorresponding to the i^(th) read voltage set of each of the targetmemory cells, and the Gray code corresponds to one of N Gray codeindexes; and selecting (N−1) optimized read voltages from (X−1)*(N−1)read voltages of the corresponding (X−1) read voltage sets according tothe obtained (X−1) abnormal Gray code count sets to form an optimizedread voltage set.

An embodiment of the disclosure provides a storage controller of astorage device configured with a rewritable non-volatile memory module.The storage controller includes a memory interface control circuit, aread voltage management unit and a processor. The memory interfacecontrol circuit is configured to couple to the rewritable non-volatilememory module, wherein the rewritable non-volatile memory moduleincludes a plurality of word lines, and the memory cells are groupedinto the word lines. The processor is coupled to the memory interfacecontrol circuit and the read voltage management unit. The processorselects a target word line from the word lines and instructs the readvoltage management unit to perform a read voltage optimization operationcorresponding to the target word line. In the read voltage optimizationoperation, the read voltage management unit is configured to use X readvoltage sets to read the target word line among the word lines, so as toobtain X read results, wherein a plurality of target memory cells amongthe memory cells correspond to the target word line, and all of thetarget memory cells are programmed, wherein the X read voltage sets aresorted in a first order according to an average voltage value of each ofthe X read voltage sets, wherein a difference value of an averagevoltage value of an (i+1)^(th) read voltage set among the X read voltagesets deducted by an average voltage value of an i^(th) read voltage setis a positive predetermined voltage offset value, wherein each of the Xread voltage sets has (N−1) read voltages sorted in a second order,wherein X is a first predetermined positive integer, i is a positiveinteger ranging from 1 to X, i is initially set to 1, and N is a secondpredetermined positive integer greater than 2. In addition, the readvoltage management unit is further configured to in the first order,update a final Gray code index of each of the target memory cells andobtain (X−1) abnormal Gray code count sets according to the X readresults, wherein an i^(th) read result among the X read results includesa Gray code corresponding to the i^(th) read voltage set of each of thetarget memory cells, and the Gray code corresponds to one of N Gray codeindexes. Finally, the read voltage management unit is further configuredto select (N−1) optimized read voltages from (X−1)*(N−1) read voltagesof the corresponding (X−1) read voltage sets according to the obtained(X−1) abnormal Gray code count sets to form an optimized read voltageset.

An embodiment of the disclosure provides a storage device. The storagedevice includes a rewritable non-volatile memory module, a memoryinterface control circuit and a processor. The rewritable non-volatilememory module includes a plurality of word lines, and each of the wordlines is coupled to a plurality of memory cells. The memory interfacecontrol circuit is configured to couple to the rewritable non-volatilememory module. The processor is coupled to the memory interface controlcircuit. The processor loads and executes a read voltage managementprogram code module to perform a read voltage optimization operation.The read voltage optimization operation includes the following steps:using X read voltage sets to read a target word line among the wordlines, so as to obtain X read results, wherein a plurality of targetmemory cells among the memory cells correspond to the target word line,and all of the target memory cells are programmed, wherein the X readvoltage sets are sorted in a first order according to an average voltagevalue of each of the X read voltage sets, wherein a difference value ofan average voltage value of an (i+1)^(th) read voltage set among the Xread voltage sets deducted by an average voltage value of an i^(th) readvoltage set is a positive predetermined voltage offset value, whereineach of the X read voltage sets has (N−1) read voltages sorted in asecond order, wherein X is a first predetermined positive integer, i isa positive integer ranging from 1 to X, i is initially set to 1, and Nis a second predetermined positive integer greater than 2; in the firstorder, updating a final Gray code index of each of the target memorycells and obtaining (X−1) abnormal Gray code count sets according to theX read results, wherein an i^(th) read result among the X read resultsincludes a Gray code corresponding to the i^(th) read voltage set ofeach of the target memory cells, and the Gray code corresponds to one ofN Gray code indexes; and selecting (N−1) optimized read voltages from(X−1)*(N−1) read voltages of the corresponding (X−1) read voltage setsaccording to the obtained (X−1) abnormal Gray code count sets to form anoptimized read voltage set.

To sum up, the data reading method, the storage controller and thestorage device provided by the embodiments of the disclosure can updatethe final Gray code indexes corresponding to all of the target memorycells of the target word line according to the read results obtained byreading the target word line read through the read voltage sets andobtain the corresponding abnormal Gray code count sets, so as to obtainthe optimized read voltage set from the read voltage sets according tothe abnormal Gray code count sets.

To make the above features and advantages of the disclosure morecomprehensible, embodiments accompanied with drawings are described indetail below.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings are included to provide a furtherunderstanding of the disclosure, and are incorporated in and constitutea part of this specification. The drawings illustrate embodiments of thedisclosure and, together with the description, serve to explain theprinciples of the disclosure.

FIG. 1 is a schematic block diagram illustrating a host system and astorage device according to an embodiment of the disclosure.

FIG. 2 is a flowchart of a data reading method according to anembodiment of the disclosure.

FIG. 3 is a flowchart illustrating step S22 depicted in FIG. 2 accordingto an embodiment of the disclosure.

FIG. 4 is a flowchart of step S224 illustrated in FIG. 3 according to anembodiment of the disclosure.

FIG. 5A is a schematic diagram illustrating threshold voltagedistributions of a plurality of memory cells corresponding to the N Graycodes and a plurality of corresponding Gray code indexes according to anembodiment of the disclosure.

FIG. 5B is a schematic diagram illustrating adjacent read voltage setsaccording to an embodiment of the disclosure.

FIG. 6A and FIG. 6B are schematic diagrams illustrating thedetermination of the final Gray code index and the abnormal Gray codecount value according to an embodiment of the disclosure.

FIG. 7 is a schematic diagram illustrating the abnormal Gray code countsets according to an embodiment of the disclosure.

FIG. 8 is a schematic diagram illustrating the determination of theoptimized read voltage set according to an embodiment of the disclosure.

FIG. 9A is a flowchart of step S224 illustrated in FIG. 3 according toanother embodiment of the disclosure.

FIG. 9B is a schematic diagram illustrating the Gray code count setsaccording to another embodiment of the disclosure.

FIG. 9C is a schematic diagram illustrating the determination of theoptimized read voltage set according to an embodiment of the disclosure.

FIG. 9D is a schematic diagram illustrating the search range fordetermining the optimized read voltage set according to an embodiment ofthe disclosure.

DESCRIPTION OF EMBODIMENTS

Reference will now be made in detail to the preferred embodiments of thedisclosure, examples of which are illustrated in the accompanyingdrawings. Wherever possible, the same reference numbers are used in thedrawings and the description to refer to the same or like parts.

Embodiments of the present invention may comprise any one or more of thenovel features described herein, including in the Detailed Description,and/or shown in the drawings. As used herein, “at least one”, “one ormore”, and “and/or” are open-ended expressions that are both conjunctiveand disjunctive in operation. For example, each of the expressions “atleast one of A, B and C”, “at least one of A, B, or C”, “one or more ofA, B, and C”, “one or more of A, B, or C” and “A, B, and/or C” means Aalone, B alone, C alone, A and B together, A and C together, B and Ctogether, or A, B and C together.

It is to be noted that the term “a” or “an” entity refers to one or moreof that entity. As such, the terms “a” (or “an”), “one or more” and “atleast one” can be used interchangeably herein.

In this embodiment, a storage device includes a rewritable non-volatilememory module and a storage device controller (a.k.a. a storagecontroller or a storage control circuit). Also, the storage device isusually used together with a host system 10 so the host system 10 canwrite data into or read data from the storage device 20.

FIG. 1 is a schematic block diagram illustrating a host system and astorage device according to an embodiment of the disclosure.

With reference to FIG. 1, the host system 10 includes a processor 110, ahost memory 120 and a data transfer interface circuit 130. In thisembodiment, the data transfer interface circuit 130 is coupled to (or,electrically connected to) the processor 110 and the host memory 120. Inanother embodiment, the processor 110, the host memory 120 and the datatransfer interface circuit 130 are coupled to one another by utilizing asystem bus.

The storage device 20 includes a storage controller 210, a rewritablenon-volatile memory module 220 and a connection interface circuit 230.Among them, the storage controller 210 includes a processor 211, a datamanagement circuit 212 and a memory interface control circuit 213.

In this embodiment, the host system 10 is coupled to the storage device20 through the data transfer interface circuit 130 and the connectioninterface circuit 230 of the storage device 20 to perform a dataaccessing operation. For example, the host system 10 can store data tothe storage device 20 or read data from the storage device 20 throughthe data transfer interface circuit 130.

In this embodiment, the processor 110, the host memory 120 and the datatransfer interface circuit 130 may be disposed on a main board of thehost system 10. The number of the data transfer interface circuit 130may be one or more. Through the data transfer interface circuit 130, themain board may be coupled to the storage device 20 in a wired manner ora wireless manner. The storage device 20 may be, for example, a flashdrive, a memory card, a solid state drive (SSD) or a wireless memorystorage device. The wireless memory storage device may be, for example,a memory storage device based on various wireless communicationtechnologies, such as a NFC (Near Field Communication) memory storagedevice, a WiFi (Wireless Fidelity) memory storage device, a Bluetoothmemory storage device, a BLE (Bluetooth low energy) memory storagedevice (e.g., iBeacon). Further, the main board may also be coupled tovarious I/O devices, including a global positioning system (GPS) module,a network interface card, a wireless transmission device, a keyboard, amonitor and a speaker, through the system bus.

In this embodiment, the data transfer interface circuit 130 and theconnection interface circuit 230 are interface circuits compatible witha peripheral component interconnect express (PCI Express) interfacestandard. Further, a data transfer operation is performed between thedata transfer interface circuit 130 and the connection interface circuit230 by using a communication protocol of a non-volatile memory express(NVMe) interface standard.

Nevertheless, it should be understood that the disclosure is not limitedto the above. The data transfer interface circuit 130 and the connectioninterface circuit 230 may also be compatible with a parallel advancedtechnology attachment (PATA) standard, an institute of electrical andelectronic engineers (IEEE) 1394 standard, a universal serial bus (USB)standard, a SD interface standard, a ultra high speed-I (UHS-I)interface standard, a ultra high speed-II (UHS-II) interface standard, amemory stick (MS) interface standard, a multi-chip package interfacestandard, a multi media card (MMC) interface standard, an eMMC interfacestandard, a universal flash storage (UFS) interface standard, an eMCPinterface standard, a CF interface standard, an integrated deviceelectronics (IDE) interface standard or other suitable standards.Further, in another embodiment, the connection interface circuit 230 andthe storage controller 210 may be packaged into one chip, or theconnection interface circuit 230 is distributed outside a chipcontaining the storage controller 210.

In this embodiment, the host memory 120 is configured to temporarilystore commands executed by the processor 110 or data. For instance, inthis exemplary embodiment, the host memory 120 may be a dynamic randomaccess memory (DRAM), or a static random access memory (SRAM) or thelike. Nevertheless, it should be understood that the disclosure is notlimited in this regard, and the host memory 120 may also be otherappropriate memories.

The storage unit 210 is configured to execute a plurality of logic gatesor control commands, which are implemented in a hardware form or in afirmware form and to perform operations of writing, reading or erasingdata in the rewritable non-volatile memory storage module 220 accordingto the commands of the host system 10.

More specifically, the processor 211 in the storage controller 210 is ahardware with computing capabilities, which is configured to control theoverall operation of the storage controller 210. Specifically, theprocessor 211 has a plurality of control commands, and the controlcommands are executed to perform various operations such as writing,reading and erasing data during operation of the storage device 20.

It should be noted that, in this embodiment, the processor 110 and theprocessor 211 are, for example, a central processing unit (CPU), amicro-processor, other programmable microprocessors, a digital signalprocessor (DSP), a programmable controller, an application specificintegrated circuits (ASIC), a programmable logic device (PLD) or othersimilar circuit elements. The disclosure is not limited in this regard.

In an embodiment, the storage controller 210 further includes a ROM (notillustrated) and a RAM (not illustrated). More particularly, the ROM hasa boot code, which is executed by the processor 221 to load the controlcommands stored in the rewritable non-volatile memory module 220 intothe RAM of the storage controller 210 when the storage controller 210 isenabled. Then, the control commands are executed by the processor 211 toperform operations, such as writing, reading or erasing data. In anotherembodiment, the control commands of the processor 211 may also be storedas program codes in a specific area (for example, physical storage unitsin the rewritable non-volatile memory module 220 dedicated for storingsystem data) of the rewritable non-volatile memory module 220.

In this embodiment, as described above, the storage controller 210further includes the data management circuit 212 and the memoryinterface control circuit 213. It should be noted that the operationsperformed by each part of the storage controller 210 may also beconsidered as the operations performed by the storage controller 210.

The data management circuit 212 is coupled to the processor 211, thememory interface control circuit 213 and the connection interfacecircuit 230. The data management circuit 212 is configured to transmitdata under instruction of the processor 211. For example, the data maybe read from the host system 10 (e.g., the host memory 120) through theconnection interface circuit 230, and the read data may be written intothe rewritable non-volatile memory module 220 through the memoryinterface control circuit 213 (e.g., a writing operation performedaccording to a write command from the host system 10). As anotherexample, the data may be read from one or more physical units of therewritable non-volatile memory module 220 through the memory interfacecontrol circuit 213 (the data may be read from one or more memory cellsin one or more physical units), and the read data may be written intothe host system 10 (e.g., the host memory 120) through the connectioninterface circuit 230 (e.g., a reading operation performed according toa read command from the host system 10). In another embodiment, the datamanagement circuit 212 may also be integrated into the processor 211.

The memory interface control circuit 213 is configured to perform thewriting (or, programming) operation, the reading operation and theerasing operation for the rewritable non-volatile memory module 220together with the data management circuit 212 under instruction of theprocessor 211.

For instance, the processor 211 may execute a write command sequence toinstruct the memory interface control circuit 213 to write the data intothe rewritable non-volatile memory module 220, the processor 211 mayexecute a read command sequence to instruct the memory interface controlcircuit 213 to read the data from one or more physical unitscorresponding to the read command in the rewritable non-volatile memorymodule 220, and the processor 211 may execute an erase command sequenceto instruct the memory interface control circuit 213 to perform theerasing operation for the rewritable non-volatile memory module 220.Each of the write command sequence, the read command sequence and theerase command sequence may include one or more program codes or commandcodes, which are configured to perform the corresponding writing,reading and erasing operations on the rewritable non-volatile memorymodule 220. In an embodiment, the processor 211 may further issue othertypes of command sequences to the memory interface control circuit 213to perform a corresponding operation on the rewritable non-volatilememory module 220.

In addition, data to be written to the rewritable non-volatile memorymodule 220 is converted into a format acceptable by the rewritablenon-volatile memory module 220 through the memory interface controlcircuit 213. Specifically, if the memory management circuit 211 is toaccess the rewritable non-volatile memory module 220, the processor 211may transmit a corresponding command sequence to the memory interfacecontrol circuit 213 to instruct the memory interface control circuit 213to execute a corresponding operation. For example, the command sequencesmay include a write command sequence for instructing to write data, aread command sequence for instructing to read data, an erase commandsequence for instructing to erase data, and other corresponding commandsequences for instructing various memory operations (for example,changing read voltage levels of a plurality of read voltages of readvoltage sets, performing a read voltage optimization operation, etc.).These command sequences may include one or more signals or data on thebus. The signals or data may include instruction codes or program codes.For example, the read command sequence may include information, such asa read identification code, a memory address and so on.

The rewritable non-volatile memory module 220 is coupled to the storagecontroller 210 (the memory control circuit unit 213) and configured tostore data written by the host system 10. The rewritable non-volatilememory module 220 may be a single level cell (SLC) NAND flash memorymodule (i.e., a flash memory module capable of storing one bit in onememory cell), a multi level cell (MLC) NAND flash memory module (i.e., aflash memory module capable of storing two bits in one memory cell), atriple level cell (TLC) NAND flash memory module (i.e., a flash memorymodule capable of storing three bits in one memory cell), a quadruplelevel cell (QLC) NAND flash memory module (i.e., a flash memory modulecapable of storing four bits in one memory cell), a 3D NAND flash memorymodule or a vertical NAND flash memory module, other flash memorymodules or any memory module having the same features. The memory cellsin the rewritable non-volatile memory module 220 are disposed in anarray.

In this embodiment, the rewritable non-volatile memory module 220 has aplurality of word lines, wherein each word line among the word linesincludes a plurality of memory cells (a plurality of memory cellscorresponding to a word line are electrically connected to the wordline). The memory cells on the same word line constitute one or morephysical programming units (physical pages). In addition, a plurality ofphysical programming units may constitute one physical unit (a physicalblock or a physical erasing unit). In this embodiment, the TLC (TripleLevel Cell) flash memory module is taken as an example for description.That is to say, in the following embodiment, one memory cell capable ofstoring three bit values is used as one physical programming unit (i.e.,in each programming operation, the data is programmed by applying aprogramming voltage on the physical programming units one by one). Here,each memory cell may be grouped into a lower physical page, a middlephysical page and an upper physical page, each of which is capable ofstoring one bit value.

In this embodiment, the memory cell is used as a minimum unit forwriting (programming) data. The physical unit is a minimum unit forerasing. Namely, each physical unit includes a minimum number of memorycells to be erased together. Each physical unit includes multiple memorycells. In the following embodiments, examples in which one physicalblock serves as one physical unit are provided. However, in anotherembodiment, one physical unit may also refer to a combination of anynumber of memory cells, depending on practical requirements. Further, itshould be understood that, when the processor 211 groups the memorycells (or the physical units) in the rewritable non-volatile memorymodule 220 for performing the corresponding management operations, thememory cells (or the physical units) are logically grouped and theiractual locations are not changed.

It should be noted that in this embodiment, the system data forrecording the information of one physical unit may be recorded byutilizing one or more memory cells in the physical unit or by utilizingone or more memory cells in a specific physical unit dedicated forrecording all the system data in a system area. In this embodiment, thesystem data corresponding to the physical unit includes information,such as a program erase cycle (PEC), a data retention timestamp (DRP), aread counter value and so on, of the physical unit. More specifically,every time when the processor 211 performs the erasing operation on aphysical unit, the processor 211 may add “1” to the PEC value currentlycorresponding to the physical unit after the erasing operation iscompleted (for example, the PEC value may add up from “0” along witheach erasing operation). In other words, the program erase cycle valuemay reflect a sum of times that the corresponding physical unit iserased. The DRT is used for indicating the time for which data is storedin the corresponding physical unit. Sizes (e.g., value differences) ofthe timestamps may be used to indicate a temporal sequence. Thedisclosure does not intend to limit a detailed format of the timestamp.Every time when the writing operation is performed on the physical unit,the processor 211 may update the DRT of the physical unit to be the timeat which the writing operation is performed on the physical unit. Inother words, the DRT corresponding to a physical unit is used forindicating the time at which the latest writing operation is performedon the physical unit (e.g., a local time at which the latest writingoperation is completed). The writing operation includes, for example,programming data to one or more memory cells of the physical unit or,for example, programming data to another type of physical address of thephysical unit. Then, the processor 211 may calculate how long the datahas been stored in the physical unit since the previous writingoperation based on the DRT. The read counter value serves to calculatethe number of times that the corresponding physical unit is read, andthe read counter value is cleared when the corresponding physical unitis erased.

For instance, in this embodiment, the processor 211 may group aplurality of physical units into a plurality of physical unit groupsbased on a statistical value of the physical units of the rewritablenon-volatile memory module 220. The statistical value includes one or acombination of the information, such as the PEC value, the DRT (alsoreferred to as a retention value) and the read counter value. Thephysical units grouped into the same physical unit group may havesimilar physical properties. The processor 211 may perform data readingon the physical units grouped into the same physical unit group throughthe same read voltage set (for example, issue the read command sequenceby using the same read voltage set to perform the read operation to thephysical units belonging to the same physical unit group).

In other embodiments, the processor 211 may group a plurality of wordlines of the rewritable non-volatile memory module 220 into a pluralityof word line sets based on a statistical value of the word lines (theprocessor 211 may calculate the statistical value of each of the wordlines), and the word lines grouped into the same word line set may havesimilar physical properties, so as to be read through the same readvoltage set (i.e., corresponding optimized read voltages) in the way asthe previous embodiment does. It should be noted that in order toperform the read voltage optimization operation corresponding to each ofthe word lines (instead of each of the physical units) on each of theword lines, the read voltage optimization operation for each of the wordlines and a read voltage optimization method of the operation aredescribed in the following embodiment. However, for an embodiment havingmultiple physical unit groups, the processor 211 may select a word lineof a physical unit from each of the physical unit groups to perform theread voltage optimization operation or select a physical unit from eachof the physical unit groups to perform the read voltage optimizationoperation.

The storage controller 210 may assign a plurality of logical units tothe rewritable non-volatile memory module 220. The host system 10 mayaccess user data stored in the physical units through the assignedlogical units. In this case, each logical unit may be formed by one ormore logical addresses. For example, the logical unit may be a logicalblock, a logical page, or a logical sector. One logical unit may bemapped to one or more physical units. The logical unit may be one ormore physical addresses, one or more physical sectors, one or morephysical programming units, or one or more physical erasing units. Inthis embodiment, the logical unit is a logical block, and a logicalsub-unit is a logical page. Each logical unit has a plurality of logicalsub-units.

In addition, the storage controller 210 may establish a logical tophysical address mapping table and a physical to logical address mappingtable to record the mapping relations between the addresses assigned tothe logical units (e.g., the logical blocks, the logical pages or thelogical sectors) of the rewritable non-volatile memory module 220 andthe addresses assigned to the physical units (e.g., the physical erasingunits, the physical programming units or the physical sectors). In otherwords, the storage controller 210 may look up for a physical unit mappedto a logical unit based on the logical to physical address mappingtable, and the storage controller 210 may look up for a logical unitmapped to a physical unit based on the physical to logical addressmapping table. However, the technical concepts concerning the mappingbetween the logical units and the physical units are common technicalmeans familiar to people having ordinary skills in the art and thus,will not be repeatedly described here.

In this embodiment, an error checking and correcting circuit 214 iscoupled to the processor 211 and configured to perform an error checkingand correction procedure to ensure accuracy of data. Specifically, whenthe processor 211 receives a writing command from the host system 10,the error checking and correcting circuit 214 may generate acorresponding error correcting code (ECC) and/or error detecting code(EDC) for data corresponding to the write command, and the processor 211may write the data and the corresponding ECC and/or EDC to therewritable non-volatile memory module 220. Thereafter, when reading datafrom the rewritable non-volatile memory module 220, the processor 211may simultaneously read the ECC or EDC corresponding to the data, andthe error checking and correcting circuit 214 may perform the errorchecking and correcting procedure on the read data based on the ECCand/or EDC. Moreover, after the error checking and correcting procedure,the error checking and correcting circuit 214 may return an error bitvalue to the processor 211 if the read data is successfully decoded.

In an embodiment, the storage controller 210 may further include abuffer memory 216 and a power management circuit 217. The buffer memoryis coupled to the processor 211 and configured to temporarily store dataand commands from the host system 10, data from the rewritablenon-volatile memory module 220 or other system data for managing thestorage device 20, such that the processor 211 may rapidly access thedata, the commands or the system data from the buffer memory 216. Thepower management circuit 217 is coupled to the memory management circuit211 and configured to control the power of the storage device 20.

In this embodiment, a read voltage management circuit unit 215 includesan abnormal Gray code counter circuit 2151 and a read voltageoptimization circuit 2152. To be more specific, the processor 211 mayselect a word line (also referred to as a target word line) among aplurality of word lines belonging to a plurality of physical units ofthe rewritable non-volatile memory module 220 at a specific time pointand instruct the read voltage management circuit unit 215 to perform theread voltage optimization operation on the target word line. It shouldbe noted that the read voltage management unit 215 is configured tomanage a plurality of read voltage sets corresponding to the word lines.An operation performed by each component of the read voltage managementunit 215 is considered as an overall operation on the read voltagemanagement unit 215.

For instance, the processor 211 may select a target word line from allof the word lines to perform the read voltage optimization operationwhen (1) the storage device 20 is idle (i.e., the storage device 20 isidle over a predetermined time threshold), (2) the storage device ispowered on, or (3) when the number of error bits in data read from aword line exceeds an error bit number threshold. The processor 211 mayselect a word line from a word line set with a less preferable physicalstate (e.g., a word line set having more program erase cycles, a greaterread counter value, a longer retention time or a greater number of errorbits) as the target word line based on one or a combination of thestatistical values and the numbers of error bits of all the word linesets. Specifically, it is assumed that the processor currently performsthe read voltage optimization operation on one of the word line sets(also referred to as a target word line set). The processor 211 mayfirst select a target word line to perform the read voltage optimizationoperation. The target word line may be selected from a plurality of wordlines of the target word line set according to a specific selectioncondition. The specific selection condition may include (1) astatistical value of the target word line being close to an average ofthe statistical values of all the word lines belonging to the word lineset which the target word line belongs to, (2) the number of error bitsof the target word line being a minimum among all the word lines of theword line set which the target word line belongs to, or (3) a word linebeing randomly selected as the target word line. It should be noted thatall of the target memory cells of the target word line are programmed,i.e., all of the target memory cells store data.

Specifically, a plurality of memory cells of each of the word lines areconfigured to be programmed to store a bit value corresponding to one ofdifferent Gray codes, a total number of the Gray codes is N, and N is afirst predetermined positive integer greater than 2. In other words, thememory cells of the target word line may store the bit valuesrespectively corresponding to different Gray codes. Details related tothe Gray codes and Gray code indexes corresponding thereto will bedescribed with reference to FIG. 5A.

FIG. 5A is a schematic diagram illustrating threshold voltagedistributions of a plurality of memory cells corresponding to the N Graycodes and a plurality of corresponding Gray code indexes according to anembodiment of the disclosure. In this embodiment, the TLC NAND flashmemory module is taken as an example for description, wherein N is 8(i.e., 2³). Each of the memory cells of the TLC NAND flash memory modulehas three physical pages for respectively storing bit data. Each of thememory cells may store a lower physical page (L), a middle physical page(M) and an upper physical page (U), each of which is capable of storinga bit value. It should be noted that according to the type of therewritable non-volatile memory module 220, N may be a predeterminedpositive integer greater than 2 (also referred to as a secondpredetermined positive integer). For example, if the rewritablenon-volatile memory module 220 is an MLC NAND flash memory module, N=4,if the rewritable non-volatile memory module 220 is a SLC NAND flashmemory module, N=2, and if the rewritable non-volatile memory module 220is a QLC NAND flash memory module, N=16.

It is assumed that the processor 211 reads a plurality of target memorycells of a target word line of the TLC NAND flash memory module througha plurality of read voltages V(i)1 to V(i)7 of a read voltage set V(i)and thereby, identifies different bit values (bit values respectivelycorresponding to different Gray codes) stored by the target memorycells.

A gate voltage in each of the memory cells may be classified into 8 Graycodes according to the read voltages V(1)₁ to V(1)₇ of a first readvoltage set sorted in a second order, for example, “L:1 M:1 U:1”, “L:0M:1 U:1”, “L:0 M:0 U:1”, “L:0 M:0 U:0”, “L:0 M:1 U:0”, “L:1 M:1 U:0”,“L:1 M:0 U:0” and “L:1 M:0 U:1” (wherein “L:” represents a bit value ofthe lower physical page, “M:” represents a bit value of the middlephysical page, “U:” represents a bit value of the upper physical page).The 8 Gray codes may also be represented as 8 bit value combinations,i.e., “111”, “011”, “001”, “000”, “010”, “110”, “100” and “101”. Anorder of the bit values in each of the bit value combinations is inaccordance with the order of the upper, middle, and lower physicalpages. That is to say, by respectively applying the read voltages V(i)₁to V(i)₇ having different voltage values in the first read voltage setV(i) to one of the memory cells of the target word line, the processor211 may determine whether a channel of the memory cell is turned on torespectively determine that a bit value (also referred to as bit data ora read bit value) stored in the memory cell corresponds to one of thedifferent Gray codes (i.e., “111”, “011”, “001”, “000”, “010”, “110”,“100” and “101”) (i.e., the bit value is read from one of the memorycells of the target word line by using the first read voltage set V(i)).For example, the Gray code “111” and the Gray code “011” may bedistinguished by the read voltage V(i)i (i.e., the left of the readvoltage V(i)i is a threshold voltage distribution corresponding to theGray code “111”, and the right of the read voltage V(i)i is a thresholdvoltage distribution corresponding to the Gray code “011”).

It should be noted that as the memory cells in the rewritablenon-volatile memory module 220 may have multiple number of the Graycodes (which is 8 in this example), the number of the read voltagesV(i)₁ to V(i)₇ in the read voltage set V(i) is the number of the Graycodes minus one (which is 7 in this example, i.e., N−1=8−1=7). Aplurality of read voltages of a read voltage set include (N−1) readvoltages which are arranged from the minimum to the maximum (from theleft to the right) from the first to the (N−1)^(th) according to voltagelevels.

It should be noted that the N Gray codes may be N corresponding Graycode indexes which are set (through the processor 211 or the readvoltage management unit 215) according to sizes of the correspondingthreshold voltage distributions. For example, as illustrated in FIG. 5A,the threshold voltage distribution corresponding to the Gray code “111”is the minimum (the leftmost), and a Gray code index G1 corresponding tothe Gray code “111” may be set as “1”. The threshold voltagedistribution corresponding to the Gray code “101” is the maximum (therightmost), and a Gray code index G8 corresponding to the Gray code“101” may be set as “8”. That is to say, in this example, the processor211 (or the read voltage management unit 215) may set Gray code indexesG1, G2, G3, G4, G5, G6, G7 and G8 corresponding to the Gray codes “111”,“011”, “001”, “000”, “010”, “110”, “100” and “101” as “1”, “2”, “3”,“4”, “5”, “6”, “7” and “8”. It should be noted that the disclosure isnot intent to limit the setting values of the Gray code indexes G1, G2,G3, G4, G5, G6, G7 and G8.

In this embodiment, the setting values of the Gray code indexes G1, G2,G3, G4, G5, G6, G7 and G8 have to comply with a rule. The aforementionedrule refers to that the set Gray code indexes G1, G2, G3, G4, G5, G6, G7and G8 have a relative number value relationship among one another,i.e., G1<G2<G3<G4<G5<G6<G7<G8.

It is to be mentioned that in this embodiment, the threshold voltagedistributions of the memory cells of the word line are more likely tohave abnormal phenomenon (for example, shifts) than default thresholdvoltage distributions. Due to the abnormality in the threshold voltagedistributions, default read voltage sets previously corresponding to thedefault threshold voltages are no longer suitable for reading the wordline having the threshold voltage distributions which have shifted. Ifthe default read voltage sets continues to be used by the processor toread the word line where the abnormality occurs to the threshold voltagedistributions, it may cause error to the read data. Accordingly, it isnecessary to find out an optimized read voltage set suitable for thecurrent threshold voltage distribution, wherein a plurality of optimizedread voltages of the optimized read voltage set may be close to ajunction (e.g., V(i)₁ to V(i)₇ illustrated in FIG. 5A) between twoadjacent threshold voltage distributions.

Details about how the read voltage management unit 215 performs the readvoltage optimization operation on the target word line (through the datareading method provided herein, which may also referred to as a readvoltage optimization method) and functions of the abnormal Gray codecounter circuit 2151 and the read voltage optimization circuit 2152 willbe specifically described with reference to several drawingshereinafter.

FIG. 2 is a flowchart of a data reading method according to anembodiment of the disclosure. Referring to FIG. 1 and FIG. 2 at the sametime, in step S21, the read voltage management unit 215 (or the abnormalGray code counter circuit 2151) uses X read voltage sets to read thetarget word line, so as to obtain X read results. The target word lineincludes a plurality of target memory cells. The X read voltage sets arearranged in a first order according to the magnitude of an averagevoltage value of each of the X read voltage sets. A difference value ofthe average voltage value of an (i+1)^(th) read voltage set among the Xread voltage sets deducted by the average voltage value of an i^(th)read voltage set is a positive predetermined voltage offset value. Eachof the X read voltage sets has (N−1) read voltages sorted in a secondorder. X is a first predetermined positive integer, i is a positiveinteger ranging from 1 to X and initially set to 1, and N is a secondpredetermined positive integer greater than 2. The X read voltage setswill be described with reference to FIG. 5B hereinafter.

FIG. 5B is a schematic diagram illustrating adjacent read voltage setsaccording to an embodiment of the disclosure. Referring to FIG. 5B, itis assumed that a first read voltage set V(1) is the first one among theX read voltage sets, and a second read voltage set V(2) is the secondone among the X read voltage sets. A voltage difference between the twoadjacent read voltage sets is a predetermined voltage offset value(V_(offset)). For example, the voltage difference between a first readvoltage V(2)₁ of the second read voltage set and a first read voltageV(1)₁ of the corresponding first read voltage set is the predeterminedvoltage offset value (V_(offset)), i.e., the difference value of avoltage value of the read voltage V(2)₁ subtracted by a voltage value ofthe read voltage V(1)₁ is equal to V_(offset). In other words, adifference value of an average voltage value of the read voltage setV(2) subtracted by an average voltage value of the read voltage set V(1)is the predetermined voltage offset value. In this embodiment, the readvoltages in the X read voltage sets may be sorted in the first order(based on the average voltage values from small to large), i.e., theaverage voltage value of the first read voltage set among the X readvoltage sets is the minimum, and the average voltage value of the lastread voltage set among the X read voltage sets is the maximum.

It is to be mentioned that in response to the selected target word line,the read voltage management unit 215 may identify a plurality ofstatistical values of the target word line and adjust the predeterminedvoltage offset value and the value (i.e., X) of the first predeterminedpositive integer according to at least one of the statistical values.The statistical values include a PEC value of the target word line, aread counter value of the target word line, a retention time value ofthe target word line and the number of error bits of data stored in thetarget word line. Specifically, if one of the statistical valuesindicates that a physical condition of the target word line is lesspreferable (e.g., the target word line has a higher number of error bitsor a greater PEC value), the read voltage management circuit unit 215may use a smaller predetermined voltage difference and more firstpredetermined positive integers to search for the optimized read voltageset in a more fine-grained manner by using a greater number of readvoltage sets where an interval between each two sets are smaller. Orotherwise, if one of the statistical values indicates that the physicalcondition of the target word line is more preferable (e.g., the targetword line has a lower number of error bits or a lower PEC value), theread voltage management circuit unit 215 may use a greater predeterminedvoltage difference and less second predetermined positive integers tosearch for the optimized read voltage set in a more coarse-grainedmanner by using a smaller number of read voltage sets where the intervalbetween each two sets are greater.

It should be noted that the disclosure is not limited to the settingmanners of the X read voltage sets. For example, in another embodiment,a manufacturer may directly set each of the X read voltage sets inadvance according to requirements and/or hardware specifications of therewritable non-volatile memory module 220. Herein, in anotherembodiment, manners in which the voltage values of the read voltages ofeach of the read voltage sets are arranged are different from oneanother, and the voltage difference between the each two adjacent readvoltage sets in the X read voltage sets is not a fixed voltagedifference. To be more detailed, the difference value between a i^(th)read voltage of an i^(th) read voltage set and a j^(th) read voltage ofan (i+1)^(th) read voltage set among the X read voltage sets is notfixed, wherein j ranges from 1 to N−1 according to the second order. Forexample, herein, in another embodiment, it is assumed that thedifference value between the first read voltage of the first readvoltage set and the first read voltage of the second read voltage set is7.5 mV, however, the difference value between the first read voltage ofthe first read voltage set and the first read voltage of the second readvoltage set may be 6 mV, −7 mV or another voltage difference which isdifferent from 7.5 mV.

After the X read voltage sets are determined, the read voltagemanagement unit 215 may use the X read voltage sets to read the targetword line, so as to obtain X read results. For example, the read voltagemanagement unit 215 may, in the first order (e.g., 1 to X), first usethe first read voltage set among the X read voltage sets, i.e., the readvoltage set V(1), to read the target word line, so as to obtain a firstread result corresponding to the read voltage set and then, may use thesecond read voltage set, i.e., the read voltage set V(2), among the Xread voltage sets to read the target word line, so as to obtain a secondread result corresponding to the read voltage set. In the same way, theread voltage management unit 215 may obtain the X read results.

Then, in step S22, the read voltage management circuit unit 215 (or theabnormal Gray code counter circuit 2151) may, in the first order, updatea final Gray code index of each of the target memory cells and obtain(X−1) abnormal Gray code count sets according to the X read results. Ani^(th) read result among the X read results includes a Gray codecorresponding to the i^(th) read voltage set of each of the targetmemory cells, and the Gray code corresponds to one of N Gray codeindexes.

For instance, among the X read results, the i^(th) read resultcorresponding to the read voltage set V(i) refers to a plurality of readbit values obtained by the read voltage management unit 215 using theread voltage set V(i) to read the target memory cells of the target wordline. The read bit values may be expressed in a format of Gray codes,and each of the read bit values may correspond to one of the N Gray codeindexes.

Details of step S22 will be described with reference to FIG. 3.

FIG. 3 is a flowchart of step S22 illustrated in FIG. 2 according to anembodiment of the disclosure. Referring to FIG. 3, in step S221, inresponse to i being equal to 1, the abnormal Gray code counter circuit2151 identifies an initial Gray code index corresponding to the i^(th)read voltage set of each of the target memory cells according to thei^(th) read result among the X read results and sets the initial Graycode index of each of the target memory cells as the final Gray codeindex of each of the target memory cells. Specifically, when i is equalto 1, the i^(th) read result is the first read result among the X readresults and corresponds to the first read voltage set among the X readvoltage sets. In addition, the first read result among the X readresults is used to initially set the final Gray code index of each ofthe target memory cells.

In step S222, the abnormal Gray code counter circuit 2151 adds i by 1,i.e., the abnormal Gray code counter circuit 2151 continues to process anext read result. For example, in step S221, the final Gray code indexof each of the target memory cells has been set according to the firstread result. Then, the abnormal Gray code counter circuit 2151, in stepS222, continues to identify the next read result to perform subsequentsteps S223 and S224.

In step S223, the abnormal Gray code counter circuit 2151 identifies atest Gray code index corresponding to the i^(th) read voltage set ofeach of the target memory cells according to the i^(th) read resultamong the X read results. In other words, the final Gray code index ofeach of the target memory cells has been set, and the abnormal Gray codecounter circuit 2151 identifies the Gray code index corresponding to thei^(th) read voltage set of each of the target memory cells according tothe i^(th) read result corresponding to the i^(th) read voltage set andconfigure the Gray code index as the test Gray code index of each of thetarget memory cells. The test Gray code index will be used in asubsequent abnormality inspection procedure (step S224).

Then, in step S224, the abnormal Gray code counter circuit 2151 comparesthe test Gray code index corresponding to the i^(th) read voltage set ofeach of the target memory cells and the final Gray code index to updatethe final Gray code index of each of the target memory cells and obtainan (i−1)^(th) abnormal Gray code count set among the (X−1) abnormal Graycode count sets. The (i−1)^(th) abnormal Gray code count set correspondsto the i^(th) read voltage set. Details of step S224 will be describedwith reference to FIG. 4. Step S224 may also referred to as theabnormality inspection procedure.

FIG. 4 is a flowchart of step S224 depicted in FIG. 3 according to anembodiment of the disclosure. Referring to FIG. 4, in step S41, theabnormal Gray code counter circuit 2151 selects a target memory cellconfigured to perform the abnormality inspection procedure correspondingto the i^(th) read voltage set from the target memory cells andidentifies a target final Gray code index and a target test Gray codeindex of the selected target memory cell. Specifically, the abnormalGray code counter circuit 2151 performs inspection on all of the targetmemory cells in the target word line one by one (for example,sequentially inspects all of the target memory cells according to anorder of a memory cell identification code of each of the memory cells).The abnormal Gray code counter circuit 2151 identifies the final Graycode index (also referred to as the target final Gray code index) andthe test Gray code index (also referred to as the target test Gray codeindex) of the selected target memory cell. For instance, if it isassumed that i is equal to 2, the abnormal Gray code counter circuit2151 may identify the final Gray code index of the selected targetmemory cell which is set/updated in the previous read result (e.g., thefirst read voltage set corresponding to the first read voltage set). Inaddition, the abnormal Gray code counter circuit 2151 may identify thetest Gray code index of the selected target memory cell according to thecurrent read result (e.g., the second read voltage set corresponding tothe second read voltage set). Then, in step S42, the abnormal Gray codecounter circuit 2151 compares the target test Gray code index and thetarget final Gray code index. Details of steps S41 and S42 will bedescribed with reference to FIG. 6A and FIG. 6B.

FIG. 6A and FIG. 6B are schematic diagrams illustrating thedetermination of the final Gray code index and the abnormal Gray codecount value according to an embodiment of the disclosure. Referring toFIG. 6A first, for instance, it is assumed that when i is equal to 1,according to the third read voltage V(1)₃ of the read voltage set V(1),the abnormal Gray code counter circuit 2151 identifies that a read bitvalue of a memory cell 601 corresponds to the Gray code index G3, andthe abnormal Gray code counter circuit 2151 sets the Gray code index G3as a final Gray code index of the memory cell 601 (for example,referring to step S221). Then, when i is equal to 2 (i.e., i+1=2) (forexample, referring to step S222), according to the third read voltageV(2)₃ of the read voltage set V(2) (the difference value of the voltagevalue of the read voltage V(2)₃ subtracted by the voltage value of theread voltage V(1)₃ is the predetermined voltage offset valueV_(offset)), the abnormal Gray code counter circuit 2151 identifies atest Gray code index of the memory cell 601 according to the second readresult and also identifies the set final Gray code index of the memorycell 601 (for example, referring to step S41).

Then, in step S42, the abnormal Gray code counter circuit 2151 comparesthe target test Gray code index and the target final Gray code index.Specifically, the abnormal Gray code counter circuit 2151 compares thetarget test Gray code index and the target final Gray code index byusing a plurality of inspection rules, so as to obtain inspectionresults. Referring to FIG. 6B, the inspection rules are represented in amanner of a rule table T610. Specifically, after the values of thetarget test Gray code index and the target final Gray code index arecompared, in response to the test Gray code index of the selected targetmemory cell being “less than” the final Gray code index (step S42→stepS43), the abnormal Gray code counter circuit 2151 determines to updatethe final Gray code index, without accumulating the abnormal Gray codecount value of the corresponding read voltage. In response to the testGray code index of the selected target memory cell being “equal to” thefinal Gray code index (step S42→step S45), the abnormal Gray codecounter circuit 2151 determines not to update the final Gray code indexand not to accumulate the abnormal Gray code count value of thecorresponding read voltage. In response to the test Gray code index ofthe selected target memory cell being “greater than” the final Gray codeindex (step S42→step S46), the abnormal Gray code counter circuit 2151determines not to update the final Gray code index, and accumulate theabnormal Gray code count value of the corresponding read voltage.

For instance, following the example set forth above, it is assumed thata target final Gray code index of the memory cell 601 is the Gray codeindex G3 (e.g., 3). If a target test Gray code index of the memory cell601 is the Gray code index G4 (e.g., 4), the abnormal Gray code countercircuit 2151 determines not to update the target final Gray code indexof the memory cell 601, but accumulate the corresponding abnormal Graycode count value. If the target test Gray code index of the memory cell601 is the Gray code index G3 (e.g., 3), the abnormal Gray code countercircuit 2151 determines not to update the target final Gray code indexof the memory cell 601 and not to accumulate the corresponding abnormalGray code count value. If the target test Gray code index of the memorycell 601 is the Gray code index G2 (e.g., 2), the abnormal Gray codecounter circuit 2151 determines to use the Gray code index G2 to updatethe target final Gray code index of the memory cell 601, but not toaccumulate the corresponding abnormal Gray code count value.

Returning to FIG. 4, that is to say, in response to the comparisonresult obtained in step S42, the entire process enters step S43, S45 orS46. If entering step S43, the abnormal Gray code counter circuit 2151,in step S43, updates the target final Gray code index as the target testGray code index. Specifically, the abnormal Gray code counter circuit2151 uses the target test Gray code index to replace the current targetfinal Gray code index. In step S44, the abnormal Gray code countercircuit 2151 determines whether the target memory cells corresponding tothe i^(th) read result are all selected. The process subsequentlyproceeds to step S49 if the target memory cells corresponding to thei^(th) read result are all selected. The process subsequently proceedsto step S41 if the target memory cells corresponding to the i^(th) readresult are not all selected (i.e., there are one or more memory cellsthat are still not selected to perform the abnormality inspectionprocedure corresponding to the i^(th) read voltage set, so as tocontinue to select an unselected target memory cell to perform theabnormality inspection procedure corresponding to the i^(th) readvoltage set.

If entering step S45, the abnormal Gray code counter circuit 2151, instep S45, maintains the target final Gray code index. Namely, theabnormal Gray code counter circuit 2151 does not change the target finalGray code index of the selected target memory cell. Then, the processsubsequently proceeds to step S44.

If entering step S46, the abnormal Gray code counter circuit 2151, instep S460, maintains the target final Gray code index, and the processsubsequently proceeds to step S47. In step S47, the abnormal Gray codecounter circuit 2151 identifies a target read voltage corresponding tothe final Gray code index and a target abnormal Gray code count valuecorresponding to the target read voltage in the i^(th) read voltage set.Specifically, based on the relationship between the Gray codes and theread voltages, the Gray code corresponding to the target final Gray codeindex corresponds to a read voltage of the i^(th) read voltage set. Forinstance, referring to FIG. 6A, it is assumed that the process entersstep S47 in a condition assuming that the target final Gray code indexG3 of the memory cell 601 is less than the target test Gray code indexG4. In this circumstance, the abnormal Gray code counter circuit 2151identifies that the target final Gray code index G3 corresponds to theread voltage V(2)₃ of the read voltage set V(2), and the abnormal Graycode counter circuit 2151 may identify the abnormal Gray code countvalue corresponding to the read voltage V(2)₃, for example, the abnormalGray code count value AC(1)₃. Specifically, the j^(th) Gray codecorresponds to the j^(th) read voltage (i.e., the read voltage V(i)_(j))in the read voltage set V(i), and the read voltage V(i)_(i) correspondsto the abnormal Gray code count value AC(i−1)_(j). It should be notedthat the corresponding relationship between the Gray codes and the readvoltages may vary according to the physical structure of the memorycells of the rewritable non-volatile memory module 220, and thedisclosure is not limited thereto. The abnormal Gray code count valueAC(i−1)_(j) may be maintained in the abnormal Gray code counter circuit2151 or the buffer memory 216.

After the target abnormal Gray code count value corresponding to thetarget read voltage is identified, in step S48, the abnormal Gray codecounter circuit 2151 adds the target abnormal Gray code count valuecorresponding to the target read voltage by 1. Then, the processsubsequently proceeds to step S44. To be more detailed, referring toFIG. 6A, it is assumed that the memory cell 601 has the target finalGray code index G3, and the memory cell 601 is identified as having thetarget test Gray code index G4 according to the read result of thecurrent read voltage V(2)₃. In this condition, since the read voltageV(2)₃ is greater than the read voltage V(1)₃, therefore if the memorycell 601 belongs to the threshold voltage distribution (which is smallerthan the read voltage V(1)₃) corresponding to the Gray code index G3 atthe left of the read voltage V(1)₃, it is in fact impossible to identifythat the memory cell 601 belongs to the threshold voltage distributionat the right of the read voltage V(2)₃, i.e., the memory cell 601 isidentified as having the Gray code index G4. In other words, in case theaforementioned phenomenon that cannot possibly happen occurs, it may bedetermined that such phenomenon is abnormal (also referred to as anabnormal Gray code phenomenon). Accordingly, the abnormal Gray codecount value corresponding to the read voltage V(2)₃ may be used toaccumulate the number of times that such abnormality occurs.

In this embodiment, the number of the memory cells in which the abnormalGray code phenomenon occurs may vary with the area sizes of thethreshold voltage distributions of the memory cells corresponding todifferent Gray code indexes. For instance, taking the threshold voltagedistribution corresponding to the Gray code index G4 as an example,because the threshold voltage distribution is approximate to abell-shaped distribution, an area of a middle region 611 of thethreshold voltage distribution corresponding to the Gray code index G4is greater than an area of another region 612 of the threshold voltagedistribution corresponding to the Gray code index G4. In addition, inthis embodiment, as a probability that the abnormal Gray code phenomenonoccurs to an arbitrary memory cell of the rewritable non-volatile memorymodule 220 is fixed, the abnormal Gray code phenomenon occurs more tothe middle region 611 of the threshold voltage distributioncorresponding to the Gray code index G4 than to the region 612 of thethreshold voltage distribution corresponding to the Gray code index G4.In other words, as the abnormal Gray code count value corresponding to aspecific read voltage decreases, the specific read voltage is closer toa region at either side of the threshold voltage distribution (which isalso a junction between the threshold voltage distribution and anotherthreshold voltage distribution).

Accordingly, by continuously selecting the unselected target memorycells to perform the abnormality inspection procedure, the abnormal Graycode phenomenon that occurs for one or more times may be identified, andthe number of times that the abnormal Gray code phenomenon occurs to thecorresponding read voltage may be accumulated by using the abnormal Graycode count values to calculate the abnormal Gray code count set of eachof the read voltage sets (except for the first read voltage set), so asto find out a plurality of read voltages that are closet to thejunctions between the threshold voltage distributions by using all theobtained abnormal Gray code count sets. The read voltages of thejunctions between the threshold voltage distributions may be consideredas a plurality of optimized read voltages. A method of identifying theoptimized read voltages will be further described with reference to FIG.8.

In response to the memory cells being all selected to perform theabnormality inspection procedure corresponding to the i^(th) readvoltage set, the process subsequently proceeds to step S49. In step S49,the abnormal Gray code counter circuit 2151 sets a plurality of targetabnormal Gray code count values respectively corresponding to aplurality of target read voltages of the i^(th) read voltage set as the(i−1)^(th) abnormal Gray code count set. Following the example (where iis equal to 2) set forth above, the abnormal Gray code counter circuit2151 may set the currently accumulated abnormal Gray code count valuescorresponding to the second read voltage set as the 1^(st) (where 2−1=1)abnormal Gray code count set (i.e., the Gray code count set AC(1))corresponding to the second read voltage set (i.e., the read voltage setV(2)) among the (X−1) abnormal Gray code count sets. Then, in responseto i being not equal to X, the process subsequently proceeds to stepS222, and in response to i being equal to X, the process subsequentlyproceeds to step S23. The obtained abnormal Gray code count sets may bemaintained in the abnormal Gray code counter circuit 2151 or the buffermemory 216.

FIG. 7 is a schematic diagram illustrating the abnormal Gray code countsets according to an embodiment of the disclosure. For instance,referring to FIG. 7, it is assumed that the (X−1) abnormal Gray codecount sets have been all set. The abnormal Gray code counter circuit2151 may record the (X−1) abnormal Gray code count sets in a manner of,for example, the use of Table T700. It is to be mentioned that asillustrated in FIG. 7. because the read voltage set V(1) is only used toset the initial final Gray code indexes of the target memory cells ofthe target word line, the first read voltage set (i.e., the read voltageset V(1)) among the X read voltage sets does not have its correspondingabnormal Gray code count set.

Returning to FIG. 2, after the (X−1) abnormal Gray code count sets areobtained, step S23 follows, where the read voltage management unit 215(or the read voltage optimization circuit 2152) selects (N−1) optimizedread voltages from (X−1)*(N−1) read voltages of the corresponding (X−1)read voltage sets according to the obtained (X−1) abnormal Gray codecount sets to form an optimized read voltage set. Related details willbe described with reference to FIG. 8.

FIG. 8 is a schematic diagram illustrating the determination of theoptimized read voltage set according to an embodiment of the disclosure.Referring to FIG. 8, it is assumed that X is 17, and N is 8. Inaddition, the abnormal Gray code counter circuit 2151 uses 16 readvoltage sets V(2) to V(17) to read the target word line, so as to obtain16 abnormal Gray code count sets AC(1) to AC(16) and a plurality ofabnormal Gray code count values contained therein of the corresponding17 read voltage sets V(2) to V(17) (e.g., as illustrated in Table T800).For instance, in order to find out each optimized read voltage of theoptimized read voltage set, (for example, in the second order), it maystart from the first read voltage V(i)₁, and the read voltageoptimization circuit 2152 may respectively find out a minimum one (i.e.,a minimum abnormal Gray code count value) (for example, the abnormalGray code count value corresponding to the read voltage V(6)1) among theabnormal Gray code count values AC(1)₁ to AC(16)₁ of the first readvoltages V(2)₁ to V(17)₁ corresponding to the read voltage sets V(2) toV(17) and select the read voltage (i.e., the read voltage V(6)₁)corresponding to the minimum one to be the first read voltage of theoptimized read voltage set. In case there are a plurality of minimumones, one may be randomly selected from the minimum ones (or the onearranged in the middle may be selected), and then the corresponding readvoltage serves as the optimized read voltage. The other optimized readvoltages of the optimized read voltage set may also be identifiedaccording to the aforementioned manner. In the same way, the finallyformed optimized read voltage set may include, for example, a pluralityof read voltages {V(6)₁, V(7)₂, V(7)₃, V(10)₄, V(7)₅, V(6)₆, V(8)₇}respectively corresponding to a plurality of abnormal Gray code countvalues {“0”, “1”, “0”, “1”, “0”, “0”, “0”}.

In addition, in another embodiment, the read voltage optimizationcircuit 2152 may calculate a total of all the abnormal Gray code countvalues of each of the abnormal Gray code count sets AC(1) to AC(16) as acorresponding abnormal Gray code count value sum. For example, anabnormal Gray code count value sum of the abnormal Gray code count setAC(1) corresponding to the read voltage V(2) is 57 (i.e.,0+18+1+16+4+8+10=57). Then, the read voltage optimization circuit 2152may select a minimum one from all the calculated abnormal Gray codecount value sums and select the read voltage set corresponding to theminimum one as the optimized read voltage set. For example, in theexample of Table T800, the abnormal Gray code count value sumcorresponding to the read voltage set AC(6) is the minimum one among allthe abnormal Gray code count value sums. Accordingly, the read voltageoptimization circuit 2152 may set the read voltage set V(6) as theoptimized read voltage set of the corresponding target word line.

In addition, in yet another embodiment, the read voltage optimizationcircuit 2152 may use a plurality of first candidate read voltage setscorresponding to the abnormal count value sums which are less than anabnormal count value sum threshold as a plurality of candidates for theoptimized read voltage set. Then, the read voltage optimization circuit2152 further selects one from the first candidate read voltage sets toserve as the optimized read voltage set of the target word line. Forexample, the read voltage optimization circuit 2152 may select the firstcandidate read voltage set having the minimum abnormal Gray code countvalue sum as the optimized read voltage set corresponding to the targetword line.

After the optimized read voltage set corresponding to the target wordline is obtained, the read voltage optimization operation correspondingto the target word line is completed. The read voltage managementcircuit unit 215 (or the read voltage optimization circuit 2152) mayrecord the optimized read voltage set, such that afterwards, therecorded optimized read voltage set may be directly applied when readingother word lines having the similar physical conditions. As in anotherexample, the other word lines in the same set may directly apply therecorded optimized read voltage set. In addition, the obtained optimizedread voltage set may be directly used to read the target word line inthe reading operation performed later on the target word line.

On the other hand, in another embodiment, the abnormal Gray code countercircuit 2151 may also more accurately determine a threshold voltagedistribution of the target word line and the Gray code count valuescorresponding to different Gray code indexes.

FIG. 9A is a flowchart of step S224 depicted in FIG. 3 according toanother embodiment of the disclosure. Referring to FIG. 9A, FIG. 9Aillustrates another process flow of step S224 in another embodiment.Namely, in another embodiment, part of the steps included in step S224are different from those of the step S224 in the original embodiment(for example, referring to FIG. 4). The following only explains thedifferent steps (i.e., steps S91, S92, S93 and S94). Before step S41,the abnormal Gray code counter circuit 2151 performs step S91. Namely,the abnormal Gray code counter circuit 2151 identifies the i^(th) Graycode count set corresponding to the i^(th) read voltage set among the XGray code count sets. The i^(th) Gray code count set has N Gray codecount values respectively corresponding to N Gray code indexes.Specifically, the N Gray code count values of the i^(th) read voltageset are used to accumulate a total amount of the identified targetmemory cells corresponding to the N Gray code count values after thetarget word line are read by the i^(th) read voltage set.

Steps S92, S93 and S94 are different from steps S45, S46 and S43 in thatthe operation of “adding the Gray code count value in the i^(th) Graycode count set corresponding to the target final Gray code index by 1”is added in each of steps S92, S93 and S94. That is to say, besidesperforming the original operation of each of steps S45, S46 and S43, theabnormal Gray code counter circuit 2151 further performs the operationof accumulating the Gray code count value corresponding to the targetfinal Gray code index when performing steps S92, S93 and S94. Namely,after confirming/updating the target final Gray code index, the abnormalGray code counter circuit 2151 further accumulates the Gray code countvalue corresponding to the target final Gray code index.

FIG. 9B is a schematic diagram illustrating the Gray code count setsaccording to another embodiment of the disclosure. For instance,Referring to FIG. 9B, it is assumed that the reading of the target wordline by using the read voltage sets V(1) to V(X) is completed. Theabnormal Gray code counter circuit 2151 may record X abnormal Gray codecount sets C(1) to C(X) in a manner of, for example, the use of TableT900. The N Gray code count values of each of the Gray code count setscorrespond to the N Gray code indexes. In comparison with theconventional method for calculating the N Gray code count valuescorresponding to the N Gray code indexes, in this embodiment, byidentifying the abnormal Gray code phenomenon, the final Gray code indexmay be prevented from being updated by using the incorrect test Graycode index due to the affect from the abnormal Gray code phenomenon,such that the statistics of the Gray code count value corresponding tothe final Gray code index may be more accurate.

On the other hand, after the more accurate Gray code count values areobtained, the abnormal Gray code counter circuit 2151 may use the X Graycode count sets C(1) to C(X) to calculate an absolute difference valuebetween each of the Gray code count values and a Gray code count averagein each of the Gray code count sets, and the difference value may alsobe referred to as an absolute deviation-from-average. Then, the abnormalGray code counter circuit 2151 may calculate a sum of all the absolutedeviation-from-averages of each of the Gray code count sets to be acorresponding absolute deviation-from-average sum. In this way, the readvoltage optimization circuit 2152 may use X absolutedeviation-from-average sums corresponding to the read voltage sets V(1)to V(X) to identify the optimized read voltage set.

In this embodiment, the Gray code count average may be set according toa total amount of the read memory cells (also referred to as a readmemory cells amount). For example, the total amount of the target memorycells is 18592*8 (in this example, the read target memory cells includea plurality of memory cells configured to store the user data of 16kilobytes (KB) and a plurality of memory cells configured to store thesystem data of 2208 bytes). The value of “18592” in “18592*8” may bereferred to as a Gray code count average (which may be represented byC_(avg)) or a Gray code count standard value (which may be representedby C_(std)). In other words, the Gray code count standard value is avalue of the read memory cells amount divided by N, and the value of Nmay be set in advance according to physical specifications of thememory, for example, MLC: N=4, TLC: N=8, and QLC: N=16.

It should be noted that in an embodiment, the read voltage managementunit 215 (or the abnormal Gray code counter circuit 2151) may calculatethe absolute deviation-from-average ADA(i)_(k) corresponding to each ofthe Gray code indexes by using the following formula:

ADA(i)_(k) =|C(i)_(k) −C _(avg)|

Therein, i is 1 to X according to a first predetermined order, and k is1 to N according to a third predetermined order. Namely, a Gray codecount deviation value is an absolute value of the difference valuebetween the corresponding Gray code count value and Gray code countaverage, which will be described with reference to FIG. 9C.

FIG. 9C is a schematic diagram illustrating the determination of theoptimized read voltage set according to an embodiment of the disclosure.Referring to FIG. 9C, it is assumed that X is 17, and N is 8. Theabnormal Gray code counter circuit 2151 uses 17 read voltage sets V(1)to V(17) to read the target word line, so as to obtain 17 absolutedeviation-from-average sets ADA(1) to ADA(17) of the corresponding 17read voltage sets V(1) to V(17) and a plurality of absolutedeviation-from-averages (as illustrated in Table T910, for example).Then, the abnormal Gray code counter circuit 2151 calculates sums of theabsolute deviation-from-averages of the absolute deviation-from-averagesets ADA(1) to ADA(17) as 17 normal Gray code absolutedeviation-from-average sums. For example, the absolutedeviation-from-average sum of the abnormal Gray code count set ADA(1)corresponding to the read voltage V(1) is 2726 (i.e.,370+333+345+313+324+399+327+315=2726). Then, the read voltageoptimization circuit 2152 may select a minimum one from all thecalculated normal Gray code absolute deviation-from-average sums andselect the read voltage corresponding to the minimum one as theoptimized read voltage set. For example, in the example of Table T910,the normal Gray code absolute deviation-from-average sum correspondingto the read voltage set V(9) is “310”, which is the minimum among allthe abnormal Gray code count value sums. Accordingly, the read voltageoptimization circuit 2152 may directly set the read voltage set V(9) asthe optimized read voltage set corresponding to the target word line.

In addition, in yet another embodiment, the read voltage optimizationcircuit 2152 may use a plurality of second candidate read voltage setscorresponding to a plurality of normal Gray code absolutedeviation-from-average sums (as shown in gray background) which are lessthan an normal Gray code absolute deviation-from-average sum thresholdas a plurality of candidates (for example, the read voltage sets V(7) toV(11)) for the optimized read voltage set.

The read voltage optimization circuit 2152 may select one from thesecond candidate read voltages to serve as the optimized read voltageset of the target word line. Or, alternatively, the read voltageoptimization circuit 2152 may, according to a sorting order of the readvoltages, search a read voltage corresponding to the minimum abnormalGray code count value according to the abnormal Gray code count setscorresponding to the second candidate read voltage sets, thereby formingthe optimized read voltage set corresponding to the target word line. Inan embodiment, the read voltage optimization circuit 2152 may select onehaving the minimum normal Gray code absolute deviation-from-average sum(as shown in dark gray background) from the second candidate readvoltage sets to serve as the optimized read voltage set (i.e. the readvoltage set V(9)).

FIG. 9D is a schematic diagram illustrating a search range fordetermining the optimized read voltage set according to an embodiment ofthe disclosure. Referring to FIG. 9D, it is assumed that X is 17, and Nis 8. Following the example illustrated in FIG. 8, the read voltageoptimization circuit 2151 may calculate an average of all the abnormalGray code count values of each of the abnormal Gray code count setsAC(1) to AC(16) and accordingly, calculate the abnormal Gray codeabsolute deviation-from-average sum corresponding to each of theabnormal Gray code count sets AC(1) to AC(16). For example, taking theabnormal Gray code count set AC(3) corresponding to the read voltage setV(4) as an example, the abnormal Gray code counter circuit 2151 maycalculate that the average of all the abnormal Gray code count averagesof the abnormal Gray code count set AC(3) is “4”, the correspondingabsolute deviation-from-averages are “3, 1, 1, 6, 2, 1 and 2” and 11″,and the sum of the absolute deviation-from-averages is “16” (i.e., theabnormal Gray code absolute deviation-from-average sum of the abnormalGray code count set AC(3)).

By deducing by analogy, as illustrated in Table 920, besides the use ofthe “abnormal Gray code count value sums” and the “normal Gray codeabsolute deviation-from-average sums” as described above, the readvoltage optimization circuit 2152 may also use the abnormal Gray codeabsolute deviation-from-average sums corresponding to the abnormal Graycode count sets AC(1) to AC(16) to quickly search a plurality ofcandidate read voltage sets corresponding to the abnormal Gray codeabsolute deviation-from-average sums which are less than an abnormalGray code absolute deviation-from-average sum threshold to use as thecandidates for the optimized read voltage set. In this example, it isassumed that the abnormal Gray code absolute deviation-from-average sumthreshold is 20. The read voltage optimization circuit 2152 may identifythe read voltage sets corresponding to the absolutedeviation-from-average sums (as shown in gray background) which are lessthan the abnormal Gray code absolute deviation-from-average sumthreshold as a plurality of third candidate read voltage sets (e.g., theread voltage sets V(4) to V(12)).

The read voltage optimization circuit 2152 may further select one fromthe third candidate read voltage sets to serve as the optimized readvoltage set corresponding to the target word line. Or, alternatively,the read voltage optimization circuit 2152 may, according to a sortingorder of the read voltages, search a read voltage corresponding to theminimum abnormal Gray code count value according to the abnormal Graycode count sets corresponding to the third candidate read voltage sets,thereby forming the optimized read voltage set corresponding to thetarget word line. In an embodiment, the read voltage management unit mayselect a third candidate read voltage set having the minimum normal Graycode absolute deviation-from-average sum (as shown in dark graybackground) from the third candidate read voltage sets to serve as theoptimized read voltage set (i.e. the read voltage set V(6)).

In an embodiment, the read voltage optimization circuit 2152 may use thecalculated abnormal Gray code absolute deviation-from-average sums, thenormal Gray code absolute deviation-from-average sums and/or theabnormal Gray code count value sums to compare with the correspondingthreshold to quickly configure a corresponding search range (as shown ingray background), so as to identify the optimized read voltages used forforming the optimized read voltage set according to the abnormal Graycode count value set corresponding to each of the candidate read voltagesets only for the candidate read voltage sets within the search range.

For example, similar to the description related FIG. 8, after the one ormore second candidate read voltage sets are identified according to thenormal Gray code absolute deviation-from-average sums and the normalGray code absolute deviation-from-average sum threshold, the readvoltage optimization circuit 2152 may identify a target second candidateread voltage having the minimum abnormal Gray code count value from aj^(th) second candidate read voltage among the (N−1) second candidateread voltages of each of the one or more second candidate read voltagesets and configure the target second candidate read voltage as a j^(th)optimized read voltage among the (N−1) second candidate read voltages ofeach of the one or more second candidate read voltage sets until the(N−1) optimized read voltages of the optimized read voltage set are allset. For example, according to Table T920, the (N−1) optimized readvoltages of the optimized read voltage set are the target secondcandidate read voltages of {V(9)₁, V(7)₂, V(7)₃, V(10)₄, V(7)₅, V(6)₆,V(8)₇} having the abnormal Gray code count values of {“0”, “1”, “0”,“1”, “0”, “0”, “0”} (in the second order).

As in another example, after the one or more third candidate readvoltage sets are identified according to the abnormal Gray code absolutedeviation-from-average sums and the abnormal Gray code absolutedeviation-from-average sum threshold, the read voltage optimizationcircuit 2152 may identify a target third candidate read voltage havingthe minimum abnormal Gray code count value from a j^(th) third candidateread voltage among the (N−1) third candidate read voltages of each ofthe one or more third candidate read voltage sets and configure thetarget third candidate read voltage as a j^(th) optimized read voltageamong the (N−1) optimized read voltages of the optimized read voltageset until the (N−1) optimized read voltages of the optimized readvoltage set are all set. For example, according to Table T920, the (N−1)optimized read voltages of the optimized read voltage set are the targetthird candidate read voltages of {V(6)₁, V(7)₂, V(7)₃, V(10)₄, V(7)₅,V(6)₆, V(8)₇} having the abnormal Gray code count values of {“0”, “1”,“0”, “1”, “0”, “0”, “0”} (in the second order).

It is to be mentioned that in the embodiments described above, the readvoltage management unit 215 is implemented in a form of a hardwarecircuit, but the disclosure is not limited thereto. For example, in anembodiment, the read voltage management unit 215 may be implemented in asoftware or a hardware form as a read voltage management program codemodule having the functions of the read voltage management unit 215. Theread voltage management program code module may include an abnormal Graycode counter program module and a read voltage optimization programmodule. The abnormal Gray code counter program module is a programmodule having the functions of the abnormal Gray code counter circuit2151. The read voltage optimization program module is a program modulehaving the functions of the read voltage optimization circuit 2152. Theprocessor 211 may access and execute the read voltage management programcode module (or the abnormal Gray code counter program module and theread voltage optimization program module) to perform the data readingmethod (also referred to as the read voltage optimization method)provided by the disclosure.

Based on the above, the data reading method, the storage controller andthe storage device provided by the embodiments of the disclosure canupdate the final Gray code indexes corresponding to all of the targetmemory cells of the target word line according to the read resultsobtained by reading the target word line through the read voltage sets,and obtain the corresponding abnormal Gray code count sets, so as toobtain the optimized read voltage set from the read voltage setsaccording to the abnormal Gray code count sets.

It will be apparent to those skilled in the art that variousmodifications and variations can be made to the structure of thedisclosed embodiments without departing from the scope or spirit of thedisclosure. In view of the foregoing, it is intended that the disclosurecover modifications and variations of this disclosure provided they fallwithin the scope of the following claims and their equivalents.

What is claimed is:
 1. A data reading method for a storage deviceconfigured with a rewritable non-volatile memory module, wherein therewritable non-volatile memory module comprises a plurality of wordlines, and each of the word lines is coupled to a plurality of memorycells, the method comprising: using X read voltage sets to read a targetword line among the plurality of word lines, so as to obtain X readresults, wherein a plurality of target memory cells among the pluralityof memory cells correspond to the target word line, and all of theplurality of target memory cells are programmed, wherein the X readvoltage sets are sorted in a first order according to an average voltagevalue of each of the X read voltage sets, wherein a difference value ofan average voltage value of an (i+1)^(th) read voltage set among the Xread voltage sets subtracted by an average voltage value of an i^(th)read voltage set is a positive predetermined voltage offset value,wherein each of the X read voltage sets has (N−1) read voltages sortedaccording to a second order, wherein X is a first predetermined positiveinteger, i is a positive integer ranging from 1 to X, i is initially setto 1, and N is a second predetermined positive integer greater than 2;in the first order, updating each of final Gray code index of theplurality of target memory cells and obtaining (X−1) abnormal Gray codecount sets according to the X read results, wherein an i^(th) readresult among the X read results comprises a Gray code corresponding tothe i^(th) read voltage set of each of the target memory cells, and theGray code corresponds to one of N Gray code indexes; and selecting (N−1)optimized read voltages from (X−1)*(N−1) read voltages of thecorresponding (X−1) read voltage sets according to the obtained (X−1)abnormal Gray code count sets to form an optimized read voltage set. 2.The data reading method as recited in claim 1, wherein according to thefirst order, updating the final Gray code index of each of the targetmemory cells and obtaining the (X−1) abnormal Gray code count setsaccording to the X read results comprises: (1) in response to i beingequal to 1, identifying an initial Gray code index corresponding to thei^(th) read voltage set of each of the target memory cells according tothe i^(th) read result among the X read results and setting the initialGray code index of each of the target memory cells as the final Graycode index of each of the target memory cells; (2) adding i by 1 andperforming step (3); (3) identifying a test Gray code indexcorresponding to the i^(th) read voltage set of each of the targetmemory cells according to the i^(th) read result among the X readresults and performing step (4); and (4) through comparing the test Graycode index corresponding to the i^(th) read voltage set of each of thetarget memory cells and the final Gray code index, updating the finalGray code index of each of the target memory cells and obtaining an(i−1)^(th) abnormal Gray code count set among the (X−1) abnormal Graycode count sets, wherein the (i−1)^(th) abnormal Gray code count setcorresponds to the i^(th) read voltage set, in response to i being equalto X, completing the step according to the first order, updating thefinal Gray code index of each of the target memory cells and obtainingthe (X−1) abnormal Gray code count sets according to the X read results,and in response to i being not equal to X, performing step (2).
 3. Thedata reading method as recited in claim 2, wherein step (4) comprisesbelow steps: (4.1) selecting a target memory cell configured to performan abnormality inspection procedure corresponding to the i^(th) readvoltage set from the target memory cells, and identifying a target finalGray code index and a target test Gray code index of the selected targetmemory cell; (4.2) comparing the target test Gray code index and thetarget final Gray code index, in response to the target test Gray codeindex being less than the target final Gray code index, performing step(4.3), in response to the target test Gray code index being equal to thetarget final Gray code index, performing step (4.5), and in response tothe target test Gray code index being greater than the target final Graycode index, performing step (4.6); (4.3) updating the final Gray codeindex as the target test Gray code index and performing step (4.4);(4.4) determining whether the plurality of target memory cellscorresponding to the i^(th) read result are all selected, performingstep (4.2) when the plurality of target memory cells corresponding tothe i^(th) read result are not all selected, and performing step (4.9)when the plurality of target memory cells corresponding to the i^(th)read result are all selected; (4.5) maintaining the final Gray codeindex and performing step (4.4); (4.6) maintaining the final Gray codeindex and performing step (4.7); (4.7) identifying a target read voltagecorresponding to the final Gray code index and a target abnormal Graycode count value corresponding to the target read voltage in the i^(th)read voltage set; (4.8) adding the target abnormal Gray code count valuecorresponding to the target read voltage by 1 and performing step (4.4);and (4.9) setting a plurality of target abnormal Gray code count valuesrespectively corresponding to a plurality of target read voltages of thei^(th) read voltage set as the (i−1)^(th) abnormal Gray code count set.4. The data reading method as recited in claim 1, wherein the step ofselecting the (N−1) optimized read voltages from the (X−1)*(N−1) readvoltages of the corresponding (X−1) read voltage sets according to theobtained (X−1) abnormal Gray code count sets to form the optimized readvoltage set comprises one of steps (S1) to (S3), comprising: (S1)identifying one or more first candidate read voltage sets among the(X−1) read voltage sets according to an abnormal count value sumthreshold and (X−1) abnormal Gray code count value sums corresponding tothe (X−1) read voltage sets to configure the optimized read voltage setaccording to the one or more first candidate read voltage sets; (S2)identifying one or more second candidate read voltage sets among the(X−1) read voltage sets according to a normal Gray code absolutedeviation-from-average sum threshold and (X−1) normal Gray code absolutedeviation-from-average sums corresponding to the (X−1) read voltage setsto configure the optimized read voltage set according to the one or moresecond candidate read voltage sets; and (S3) identifying one or morethird candidate read voltage sets among the (X−1) read voltage setsaccording to an abnormal Gray code absolute deviation-from-average sumthreshold and (X−1) abnormal Gray code absolute deviation-from-averagesums corresponding to the (X−1) read voltage sets to configure theoptimized read voltage set according to the one or more third candidateread voltage sets.
 5. The data reading method as recited in claim 4,wherein step (S1) comprises: calculating the (X−1) abnormal Gray codecount value sums corresponding to the (X−1) abnormal Gray code countsets, wherein a first abnormal Gray count value sum of a first abnormalGray code count set among the (X−1) abnormal Gray code count sets is asum of all the abnormal Gray count values of the first abnormal Graycode count set; and identifying one or more target abnormal Gray codecount value sums which are less than the abnormal count value sumthreshold from the (X-) abnormal Gray code count value sums andidentifying the one or more first candidate read voltage setscorresponding to the one or more target abnormal Gray code count valuesums from the (X−1) read voltage sets, wherein step (S2) comprises:calculating the (X−1) normal Gray code absolute deviation-from-averagesums corresponding to the (X−1) read voltage sets according to (X−1)Gray code count sets corresponding to the (X−1) read voltage sets and aGray code count average; and identifying one or more normal Gray codeabsolute deviation-from-average sums which are less than the normal Graycode absolute deviation-from-average sum threshold from the (X−1) normalGray code absolute deviation-from-average sums and identifying the oneor more second candidate read voltage sets corresponding to the one ormore target Gray code absolute deviation-from-average sums from the(X−1) read voltage sets, wherein step (S3) comprises: calculating (X−1)abnormal Gray code count averages corresponding to the (X−1) abnormalGray code count sets, wherein a first abnormal Gray count average of thefirst abnormal Gray code count set among the (X−1) abnormal Gray codecount sets is an average of all the abnormal Gray count values of thefirst abnormal Gray code count set; calculating the (X−1) abnormal Graycode absolute deviation-from-average sums corresponding to the (X−1)abnormal Gray code count sets according to the (X−1) abnormal Gray codecount sets and the (X−1) abnormal Gray code count averages correspondingto the (X−1) abnormal Gray code count sets; and identifying one or moretarget abnormal Gray code absolute deviation-from-average sums which areless than the abnormal Gray code absolute deviation-from-average sumthreshold from the (X−1) abnormal Gray code absolutedeviation-from-average sums and identifying the one or more thirdcandidate read voltage sets corresponding to the one or more targetabnormal Gray code absolute deviation-from-average sums from the (X−)read voltage sets.
 6. The data reading method as recited in claim 5,wherein step (S1) further comprises: setting a first candidate readvoltage set having a minimum abnormal Gray code count value sum amongthe one or more first candidate read voltage sets as the optimized readvoltage set, wherein step (S2) further comprises: setting a secondcandidate read voltage set having a minimum normal Gray code absolutedeviation-from-average sum among the one or more second candidate readvoltage sets as the optimized read voltage set, wherein step (S3)further comprises: setting a third candidate read voltage set having aminimum abnormal Gray code absolute deviation-from-average sum among theone or more third candidate read voltage sets as the optimized readvoltage set.
 7. The data reading method as recited in claim 5, whereinstep (S1) further comprises: identifying a target first candidate readvoltage having a minimum abnormal Gray code count value from a j^(th)first read voltage among (N−1) first candidate read voltages of each ofthe one or more first candidate read voltage sets and setting the targetfirst candidate read voltage as a j^(th) optimized read voltage amongthe (N−1) optimized read voltages of the optimized read voltage setuntil all of the (N−1) optimized read voltages of the optimized readvoltage set are set, wherein step (S2) further comprises: identifying atarget second candidate read voltage having a minimum abnormal Gray codecount value from a j^(th) second candidate read voltage among (N−1)second candidate read voltages of each of the one or more secondcandidate read voltage sets and setting the target second candidate readvoltage as a j^(th) optimized read voltage among the (N−1) optimizedread voltages of the optimized read voltage set until all of the (N−1)optimized read voltages of the optimized read voltage set are set,wherein step (S3) further comprises: identifying a target thirdcandidate read voltage having a minimum abnormal Gray code count valuefrom a j^(th) third candidate read voltage among (N−1) third candidateread voltages of each of the one or more third candidate read voltagesets and setting the target third candidate read voltage as a i^(th)optimized read voltage among the (N−1) optimized read voltages of theoptimized read voltage set until all of the (N−1) optimized readvoltages of the optimized read voltage set are set.
 8. A storagecontroller configured for controlling a storage device disposed with arewritable non-volatile memory module, comprising: a memory interfacecontrol circuit, configured to couple to the rewritable non-volatilememory module, wherein the rewritable non-volatile memory modulecomprises a plurality of word lines, and each of the plurality of wordlines is coupled to a plurality of memory cells; a read voltagemanagement unit; and a processor, coupled to the memory interfacecontrol circuit and the read voltage management unit, wherein theprocessor selects a target word line from the plurality of word linesand instructs the read voltage management unit to perform a read voltageoptimization operation corresponding to the target word line, wherein inthe read voltage optimization operation, the read voltage managementunit is configured to use X read voltage sets to read the target wordline among the plurality of word lines, so as to obtain X read results,wherein a plurality of target memory cells among the plurality of memorycells correspond to the target word line, and all of the plurality oftarget memory cells are programmed, wherein the X read voltage sets aresorted in a first order according to an average voltage value of each ofthe X read voltage sets, wherein a difference value of an averagevoltage value of an (i+1)^(th) read voltage set among the X read voltagesets subtracted by an average voltage value of an i^(th) read voltageset is a positive predetermined voltage offset value, wherein each ofthe X read voltage sets has (N−1) read voltages sorted in a secondorder, wherein X is a first predetermined positive integer, i is apositive integer ranging from 1 to X, i is initially set to 1, and N isa second predetermined positive integer greater than 2; wherein the readvoltage management unit is further configured according to the firstorder, update a final Gray code index of each of the plurality of targetmemory cells and obtain (X−1) abnormal Gray code count sets according tothe X read results, wherein an i^(th) read result among the X readresults comprises a Gray code corresponding to the i^(th) read voltageset of each of the plurality of target memory cells, and the Gray codecorresponds to one of N Gray code indexes, wherein the read voltagemanagement unit is further configured to select (N−1) optimized readvoltages from (X−1)*(N−1) read voltages of the corresponding (X−1) readvoltage sets according to the obtained (X−1) abnormal Gray code countsets to form an optimized read voltage set.
 9. The storage controller asrecited in claim 7, wherein the operation that the read voltagemanagement unit is further configured to in the first order, update thefinal Gray code index of each of the plurality of target memory cellsand obtain the (X−1) abnormal Gray code count sets according to the Xread results comprises: (1) in response to i being equal to 1, the readvoltage management unit identifying an initial Gray code indexcorresponding to the i^(th) read voltage set of each of the plurality oftarget memory cells according to the i^(th) read result among the X readresults and setting the initial Gray code index of each of the targetmemory cells as the final Gray code index of each of the plurality oftarget memory cells; (2) the read voltage management unit adding i by 1and performing step (3); (3) the read voltage management unitidentifying a test Gray code index corresponding to the i^(th) readvoltage set of each of the plurality of target memory cells according tothe i^(th) read result among the X read results and performing step (4);and (4) through comparing the test Gray code index corresponding to thei^(th) read voltage set of each of the plurality of target memory cellsand the final Gray code index, the read voltage management unit updatingthe final Gray code index of each of the plurality of target memorycells and obtain an (i−1)^(th) abnormal Gray code count set among the(X−1) abnormal Gray code count sets, wherein the (i−1)^(th) abnormalGray code count set corresponds to the i^(th) read voltage set, inresponse to i being equal to 1, the read voltage management unitcompleting the operation in the first order, updating the final Graycode index of each of the plurality of target memory cells and obtainingthe (X−1) abnormal Gray code count sets according to the X read results,and in response to i being not equal to 1, the read voltage managementunit performing step (2).
 10. The storage controller as recited in claim8, wherein step (4) comprises the following steps: (4.1) the readvoltage management unit selecting a target memory cell configured toperform an abnormality inspection procedure corresponding to the i^(th)read voltage set from the plurality of target memory cells andidentifying a target final Gray code index and a target test Gray codeindex of the selected target memory cell; (4.2) the read voltagemanagement unit comparing the target test Gray code index and the targetfinal Gray code index, in response to the target test Gray code indexbeing less than the target final Gray code index, the read voltagemanagement unit performing step (4.3), in response to the target testGray code index being equal to the target final Gray code index, theread voltage management unit performing step (4.5), and in response tothe target test Gray code index being greater than the target final Graycode index, the read voltage management unit performing step (4.6);(4.3) the read voltage management unit updating the final Gray codeindex as the target test Gray code index and performing step (4.4);(4.4) the read voltage management unit determining whether the targetmemory cells corresponding to the i^(th) read result are all selected,the read voltage management unit performing step (4.2) when theplurality of target memory cells corresponding to the i^(th) read resultare not all selected, and the read voltage management unit performingstep (4.9) when the target memory cells corresponding to the i^(th) readresult are all selected; (4.5) the read voltage management unitmaintaining the final Gray code index and performing step (4.4); (4.6)the read voltage management unit maintaining the final Gray code indexand performing step (4.7); (4.7) the read voltage management unitidentifying a target read voltage corresponding to the final Gray codeindex and a target abnormal Gray code count value corresponding to thetarget read voltage in the i^(th) read voltage set; (4.8) the readvoltage management unit adding the target abnormal Gray code count valuecorresponding to the target read voltage by 1 and performing step (4.4);and (4.9) the read voltage management unit setting a plurality of targetabnormal Gray code count values respectively corresponding to aplurality of target read voltages of the i^(th) read voltage set to the(i−1)^(th) abnormal Gray code count set.
 11. The storage controller asrecited in claim 7, wherein in the operation of the read voltagemanagement unit selecting the (N−1) optimized read voltages from the(X−1)*(N−1) read voltages of the corresponding (X−1) read voltage setsaccording to the obtained (X−1) abnormal Gray code count sets to formthe optimized read voltage set, the read voltage management unitperforms one of steps (S1) to (S3), comprising: (S1) identifying one ormore first candidate read voltage sets among the (X−1) read voltage setsaccording to an abnormal count value sum threshold and (X−1) abnormalGray code count value sums corresponding to the (X−1) read voltage setsto set the optimized read voltage set according to the one or more firstcandidate read voltage sets; (S2) identifying one or more secondcandidate read voltage sets among the (X−1) read voltage sets accordingto a normal Gray code absolute deviation-from-average sum threshold and(X−1) normal Gray code absolute deviation-from-average sumscorresponding to the (X−1) read voltage sets to set the optimized readvoltage set according to the one or more second candidate read voltagesets; and (S3) identifying one or more third candidate read voltage setsamong the (X−1) read voltage sets according to an abnormal Gray codeabsolute deviation-from-average sum threshold and (X−1) abnormal Graycode absolute deviation-from-average sums corresponding to the (X−1)read voltage sets to set the optimized read voltage set according to theone or more third candidate read voltage sets.
 12. The storagecontroller as recited in claim 11, wherein in step (S1), the readvoltage management unit calculates the (X−1) abnormal Gray code countvalue sums corresponding to the (X−1) abnormal Gray code count sets,wherein a first abnormal Gray count value sum of a first abnormal Graycode count set among the (X−1) abnormal Gray code count sets is a sum ofall the abnormal Gray count values of the first abnormal Gray code countset, wherein the read voltage management unit identifies one or moretarget abnormal Gray code count value sums which are less than theabnormal count value sum threshold from the (X−1) abnormal Gray codecount value sums and identifying the one or more first candidate readvoltage sets corresponding to the one or more target abnormal Gray codecount value sums from the (X−1) read voltage sets, wherein in step (S2),the read voltage management unit calculates the (X−1) normal Gray codeabsolute deviation-from-average sums corresponding to the (X−1) readvoltage sets according to (X−1) Gray code count sets corresponding tothe (X−1) read voltage sets and a Gray code count average, wherein theread voltage management unit identifies one or more normal Gray codeabsolute deviation-from-average sums which are less than the normal Graycode absolute deviation-from-average sum threshold from the (X−1) normalGray code absolute deviation-from-average sums and identifies the one ormore second candidate read voltage sets corresponding to the one or moretarget Gray code absolute deviation-from-average sums from the (X−1)read voltage sets, wherein in step (S3), the read voltage managementunit calculates (X−1) abnormal Gray code count averages corresponding tothe (X−1) abnormal Gray code count sets, wherein a first abnormal Graycount average of the first abnormal Gray code count set among the (X−1)abnormal Gray code count sets is an average of all the abnormal Graycount values of the first abnormal Gray code count set; wherein the readvoltage management unit calculates the (X−1) abnormal Gray code absolutedeviation-from-average sums corresponding to the (X−1) abnormal Graycode count sets according to the (X−1) abnormal Gray code count sets andthe (X−1) abnormal Gray code count averages corresponding to the (X−1)abnormal Gray code count sets, wherein the read voltage management unitidentifies one or more target abnormal Gray code absolutedeviation-from-average sums which are less than the abnormal Gray codeabsolute deviation-from-average sum threshold from the (X−1) abnormalGray code absolute deviation-from-average sums and identifies the one ormore third candidate read voltage sets corresponding to the one or moretarget abnormal Gray code absolute deviation-from-average sums from the(X−1) read voltage sets.
 13. The storage controller as recited in claim12, wherein in step (S1), the read voltage management unit configures afirst candidate read voltage set having a minimum abnormal Gray codecount value sum among the one or more first candidate read voltage setsas the optimized read voltage set, wherein in step (S2), the readvoltage management unit configures a second candidate read voltage sethaving a minimum normal Gray code absolute deviation-from-average sumamong the one or more second candidate read voltage sets as theoptimized read voltage set, wherein in step (S3), the read voltagemanagement unit configures a third candidate read voltage set having aminimum abnormal Gray code absolute deviation-from-average sum among theone or more third candidate read voltage sets as the optimized readvoltage set.
 14. The storage controller as recited in claim 12, whereinin step (S1), the read voltage management unit identifies a target firstcandidate read voltage having a minimum abnormal Gray code count valuefrom a j^(th) first read voltage among (N−1) first candidate readvoltages of each of the one or more first candidate read voltage setsand configures the target first candidate read voltage as a j^(th)optimized read voltage among the (N−1) optimized read voltages of theoptimized read voltage set until all of the (N−1) optimized readvoltages of the optimized read voltage set are configured, wherein instep (S2), the read voltage management unit identifies a target secondcandidate read voltage having a minimum abnormal Gray code count valuefrom a j^(th) second candidate read voltage among (N−1) second candidateread voltages of each of the one or more second candidate read voltagesets and configures the target second candidate read voltage as a j^(th)optimized read voltage among the (N−1) optimized read voltages of theoptimized read voltage set until all of the (N−1) optimized readvoltages of the optimized read voltage set are configured, wherein instep (S3), the read voltage management unit identifies a target thirdcandidate read voltage having a minimum abnormal Gray code count valuefrom a j^(th) third candidate read voltage among (N−1) third candidateread voltages of each of the one or more third candidate read voltagesets and configures the target third candidate read voltage as a j^(th)optimized read voltage among the (N−1) optimized read voltages of theoptimized read voltage set until all of the (N−1) optimized readvoltages of the optimized read voltage set are set.
 15. A storagedevice, comprising: a rewritable non-volatile memory module, wherein therewritable non-volatile memory module comprises a plurality of wordlines, and each of the plurality of word lines is coupled to a pluralityof memory cells; a memory interface control circuit, configured tocouple to the rewritable non-volatile memory module, and a processor,coupled to the memory interface control circuit, wherein the processorloads and executes a read voltage management program code module toperform a read voltage optimization operation, wherein the read voltageoptimization operation comprises the following steps: using X readvoltage sets to read a target word line among the plurality of wordlines, so as to obtain X read results, wherein a plurality of targetmemory cells among the plurality of memory cells correspond to thetarget word line, and all of the target plurality of memory cells areprogrammed, wherein the X read voltage sets are sorted in a first orderaccording to an average voltage value of each of the X read voltagesets, wherein a difference value of an average voltage value of an(i+1)^(th) read voltage set among the X read voltage sets subtracted byan average voltage value of an i^(th) read voltage set is a positivepredetermined voltage offset value, wherein each of the X read voltagesets has (N−1) read voltages are arranged according to a second order,wherein X is a first predetermined positive integer, i is a positiveinteger ranging from 1 to X, i is initially set to 1, and N is a secondpredetermined positive integer greater than 2; in the first order,updating a final Gray code index of each of the plurality of targetmemory cells and obtaining (X−1) abnormal Gray code count sets accordingto the X read results, wherein an i^(th) read result among the X readresults comprises a Gray code corresponding to the i^(th) read voltageset of each of the plurality of target memory cells, and the Gray codecorresponds to one of N Gray code indexes; and selecting (N−1) optimizedread voltages from (X−1)*(N−1) read voltages of the corresponding (X−1)read voltage sets according to the obtained (X−1) abnormal Gray codecount sets to form an optimized read voltage set.